/* 
 * File:   header.h
 * Author: landry
 *
 * Created on October 9, 2009, 5:28 AM
 */


#include <sys/types.h>
#include <syslog.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/soundcard.h>
#include <fcntl.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <netdb.h>
#include <pthread.h>

#include <limits.h>
#include <stdio.h>
#include <inttypes.h>

#define LENGTH 3    /* how many seconds of speech to store */
#define RATE 8000   /* the sampling rate */
#define SIZE 8      /* sample size: 8 or 16 bits */
#define CHANNELS 1  /* 1 = mono 2 = stereo */
#define TAILLE 	 160 /* size of sender and receiver buffer */
#define MAX_INPUT_SIZE 255 
#define NB_REPETITION 1 /* how many copies of the input file we will transmit
							this option is not usefull for /dev/audio and /dev/dsp */


#define MU_LAW_FILE "/dev/audio"
#define PCM_FILE "/dev/dsp"
#define MU_LAW "ulaw"
#define PCM "pcm"
#define CAT_A "cat /dev/audio > tmp"
#define CAT_P "cat /dev/dsp > tmp"
#define SERV_PORT 7001;

//typedef struct param;


//structure a passer au thread qui calcule le debit a la  reception

#ifndef _HEADER_H
#define	_HEADER_H

int err_stop (char* msg);

int collect_stat();

//void set_delay();

//int copie_c(int deb,int fin, unsigned char *src, unsigned char *dest);

int open_audio_device_MuLaw(char *name, int mode);
int open_audio_device_PCM(char *name, int mode);

#endif	/* _HEADER_H */